<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="org.limp.mine.StringTool"%>
<%@ page import="jt.classic.system.wordbook.WordBookUtil" %>
<%@ page import="jt.classic.system.user.IUser"%>
<%@ page import="jt.classic.system.ISystem"%>
<%@ page import="jt.classic.system.tablequery.TableQuery"%>
<%@ page import="jt.classic.system.tablequery.TableQueryCenter"%>
<%
    String context = jt.classic.system.ISystem.getContextPath();

	IUser user = ISystem.getSessionUser(request);
	
	String serverUrl = WordBookUtil.getWordBookItemName("jspparameters", "emapServerURL");
	
	TableQueryCenter register = TableQueryCenter.getInstance();
	
	String queryKey = "tracklist";
	
	if(ISystem.matchrole(user, "Supervisor")){
		queryKey = "selftracklist";
	}
	
	if(ISystem.matchrole(user, "SupervisorManager")){
		queryKey = "tracklist";
	}
	
	TableQuery query = register.getTableQuery(queryKey);
%>
<html>
<head>
<script src='<%=serverUrl %>'  type='text/javascript'></script>
</head>
<jsp:include page="../head.jsp"></jsp:include>
<script type="text/javascript" src="<%=context %>/app/maps/js/trackmap.js"></script>
<%
	if(query != null && !StringTool.checkString(query.icssurl()).equals("")){
%>
<link rel="stylesheet" type="text/css" href="<%=context + query.icssurl()%>" />
<%
	}
%>
<%
	if(query != null && !StringTool.checkString(query.ijsurl()).equals("")){
%>
<script src="<%=context + query.ijsurl()%>"></script>
<%
	}
%>
<body onload="javascript:init('<%=queryKey %>');">
</body>
</html>